package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:16:33 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUIPageParamBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUIPageParam productUIPageParam;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUIPageParam);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUIPageParamDAO.Id);

    mappedDaoFields.put("pageId", com.ourteam.product.ui.dao.IProductUIPageParamDAO.PageId);

    mappedDaoFields.put(
        "pageParamId", com.ourteam.product.ui.dao.IProductUIPageParamDAO.PageParamId);

    mappedDaoFields.put(
        "pageParamValue", com.ourteam.product.ui.dao.IProductUIPageParamDAO.PageParamValue);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUIPageParamDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUIPageParamDAO.Remarks);

    mappedDaoFields.put("paramCode", com.ourteam.product.ui.dao.IProductUIPageParamDAO.ParamCode);

    mappedDaoFields.put("paramDesc", com.ourteam.product.ui.dao.IProductUIPageParamDAO.ParamDesc);

    mappedDaoFields.put(
        "paramInputType", com.ourteam.product.ui.dao.IProductUIPageParamDAO.ParamInputType);

    mappedDaoFields.put(
        "pageParamValueId", com.ourteam.product.ui.dao.IProductUIPageParamDAO.PageParamValueId);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUIPageParamBean() {
    super();

    this.productUIPageParam = new com.ourteam.product.ui.dao.ProductUIPageParam();
  }

  public ProductUIPageParamBean(com.ourteam.product.ui.dao.ProductUIPageParam productUIPageParam) {
    super();

    this.productUIPageParam = productUIPageParam;
  }

  public com.ourteam.product.ui.dao.ProductUIPageParam convertToProductUIPageParam() {
    return this.productUIPageParam;
  }

  public com.ourteam.product.ui.dao.ProductUIPageParam convertTo() {
    return this.productUIPageParam;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUIPageParam.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUIPageParam.setId(id);
  }

  /**
   * Get pageId
   *
   * @return long
   */
  public long getPageId() {
    return (long) this.productUIPageParam.getPageId();
  }

  /**
   * Set pageId
   *
   * @parameter long
   */
  public void setPageId(long pageId) {

    this.productUIPageParam.setPageId(pageId);
  }

  /**
   * Get pageParamId
   *
   * @return long
   */
  public long getPageParamId() {
    return (long) this.productUIPageParam.getPageParamId();
  }

  /**
   * Set pageParamId
   *
   * @parameter long
   */
  public void setPageParamId(long pageParamId) {

    this.productUIPageParam.setPageParamId(pageParamId);
  }

  /**
   * Get pageParamValue
   *
   * @return String
   */
  public String getPageParamValue() {
    return (String) this.productUIPageParam.getPageParamValue();
  }

  /**
   * Set pageParamValue
   *
   * @parameter String
   */
  public void setPageParamValue(String pageParamValue) {

    this.productUIPageParam.setPageParamValue(pageParamValue);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUIPageParam.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUIPageParam.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUIPageParam.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUIPageParam.setRemarks(remarks);
  }

  /**
   * Get paramCode
   *
   * @return String
   */
  public String getParamCode() {

    return (String) this.productUIPageParam.getParamCode();
  }

  /**
   * Get paramDesc
   *
   * @return String
   */
  public String getParamDesc() {

    return (String) this.productUIPageParam.getParamDesc();
  }

  /**
   * Get paramInputType
   *
   * @return String
   */
  public String getParamInputType() {

    return (String) this.productUIPageParam.getParamInputType();
  }

  /**
   * Get pageParamValueId
   *
   * @return long
   */
  public long getPageParamValueId() {
    return (long) this.productUIPageParam.getPageParamValueId();
  }

  /**
   * Set pageParamValueId
   *
   * @parameter long
   */
  public void setPageParamValueId(long pageParamValueId) {

    this.productUIPageParam.setPageParamValueId(pageParamValueId);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUIPageParamBean) == false) {
      return false;
    } // end if

    ProductUIPageParamBean other = (ProductUIPageParamBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUIPageParam tempProductUIPageParam =
        other.convertToProductUIPageParam();

    if (tempProductUIPageParam == null || this.productUIPageParam == null) {
      isEqual = false;
    } else if (tempProductUIPageParam == this.productUIPageParam
        || tempProductUIPageParam.equals(this.productUIPageParam)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUIPageParamBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIPageParam[] aProductUIPageParams) {

    return toArray(aProductUIPageParams, null);
  }

  public static ProductUIPageParamBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIPageParam[] aProductUIPageParams,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUIPageParams)) {
      return new ProductUIPageParamBean[0];
    }

    int length = aProductUIPageParams.length;

    ProductUIPageParamBean[] beans = new ProductUIPageParamBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUIPageParamBean(aProductUIPageParams[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUIPageParams[i]});
      }
    }

    return beans;
  }
}
